#coding:utf-8
# 登陆页面

from selenium import webdriver
from selenium.webdriver.common.by import By
from BasePage import BasePage


class LoginPage(BasePage):
    loginurl = "http://42244nb079.wicp.vip:25169/zentao/user-login.html"
    url = loginurl

    username = (By.NAME, "account")
    pwd = (By.NAME, "password")
    button = (By.ID,"submit")

    def login(self,text,password):
        self.input(self.username,text)
        self.input(self.pwd, password)
        self.click(self.button)

if __name__ == '__main__':
    driver = webdriver.Firefox()
    lp = LoginPage(driver)
    lp.login("mayin",'mayin123456')